# coding=utf-8


def fib(n):
    if n <= 2:
        return n
    else:
        return fib(n-1) + fib(n-2)

print(fib(5))


# 三元公式
def fib(n):
    return n and n<=2 or fib(n-1) + fib(n-2)

print(fib(6))
